package net.lanelife.casino.caipiao.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import net.lanelife.casino.common.entity.annotation.Checked;
import net.lanelife.casino.common.entity.support.CheckableEntity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 手续费规则表
 * 
 * @author Lane
 * 
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "TB_FEE_RULE")
public class FeeRule extends CheckableEntity<Integer> {

	private static final long serialVersionUID = -3161078675563784226L;

	@Checked
	@Column(name = "BEGIN_AMOUNT", nullable = false)
	private Double beginAmount;

	@Checked
	@Column(name = "END_AMOUNT", nullable = false)
	private Double endAmount;

	@Checked
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "MODE", nullable = false)
	private Mode mode;
	
	@Checked
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "TYPE", nullable = false)
	private Type type;
	
	@Checked
	@Column(name = "FEE", nullable = false)
	private Double fee;
	
	@Checked
	@Column(name = "MIN_FEE", nullable = false)
	private Double minFee;
	
	@Checked
	@Column(name = "MAX_FEE", nullable = false)
	private Double maxFee;
	
	public static enum Mode {
		/**
		 * 固定
		 */
		FIXATION, 
		/**
		 * 比例
		 */
		PROPORTION
	}
	
	public static enum Type {
		TK, ZZ
	}

	public Double getBeginAmount() {
		return beginAmount;
	}

	public void setBeginAmount(Double beginAmount) {
		this.beginAmount = beginAmount;
	}

	public Double getEndAmount() {
		return endAmount;
	}

	public void setEndAmount(Double endAmount) {
		this.endAmount = endAmount;
	}

	public Mode getMode() {
		return mode;
	}

	public void setMode(Mode mode) {
		this.mode = mode;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public Double getFee() {
		return fee;
	}

	public void setFee(Double fee) {
		this.fee = fee;
	}

	public Double getMinFee() {
		return minFee;
	}

	public void setMinFee(Double minFee) {
		this.minFee = minFee;
	}

	public Double getMaxFee() {
		return maxFee;
	}

	public void setMaxFee(Double maxFee) {
		this.maxFee = maxFee;
	}

}
